ziggotronic logo  
  english german french

2 Basic level tuning

Before you start to apply the following tweaks, be sure to have finished your level in the level editor! All modifications described here will be lost if you reload your level into the level editor and save it from there! Always make a backup copy of both *.afs and *.level file before any major change!

2.1 Pickup respawn times

You might have noticed pickups take 30 seconds before they respawn! If you used the 'extra' cheat in the evel editor,they will not come back at all! This can be changed in the SpawnPickup(...); statements you will usually find somewhere in the upper third of the script. The last number within the brackets is the respawn time in seconds, 30.00000 by default. First, strip those trailing zeros! Next, set the number to any positive number you want.
If you haven't found any SpawnPickup(...); statements but only CreatePickup(...); just change them into SpawnPickup(...); and add the respawn time at the end of the brackets, separated by a comma.
Pickup respawn times
5 seconds is a good setting for fast playing maps

2.2 Locking light switches

As you probably already know, doors can be locked, either unconditionally or only to be opened with a certain key. This is caused by a DoorLock(...); statement in the AFS script. You can also open doors, this will generate a DoorSetOpen(...); in the script. Well, these commands work for many more objects, including light switches. The only thing you have to do is find out the name of the switch you want to modify. First, go see the object list. Search for names that look like switch_kidsroom or switch_sistersroom. All you have to do is insert a DoorSetOpen(GetActorByName("switch_...")); to set the light switch to OFF and/or a DoorLock(GetActorByName("switch_..."), false, false, false, false, false, false); to lock the switch in its position. The best spot to insert these commands is directly below the SpawnPickup(...);s, other (lower) positions may create side effects.
Locking light switches
locking special interactive objects like the roll curtain in the kids room is also possible...

2.3 Lighting flammables

To create a spooky athmosphere, in addition to locking the light switch in off position, you can set flammables to be lit at any time in your level. This is done, you might have guessed, with the DoorSetOpen(...); command! Now all you need is the names of the flammables, right? That's the tricky part: They all have names like "$unique0", "$unique1" etc... So if you want to light them all, just count them and add the same number of DoorSetOpen(GetActorByName("$unique0")); DoorSetOpen(GetActorByName("$unique1")); etc... Otherwise, you will have to find out which is which on your own, the order in which you added them in your level might be a hint. For built-in flammables like the logs in the chimney there's special names. As the entire list of flammables can be found in the object list , just check there to find out more.
Lighting flammables
ideal for copy and paste, just increment the numbers!

last modified on: 17.05.2007

Valid XHTML 1.0!